<template>
  <div class="wty-header" :style="{ 'background-image': url }">
    <div class="wty-user-info">
      <span class="iconfont icon-denglu"></span>
      <span> 您好，{{ userName }} </span>
      <span>退出</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userName: "",
      url:
        "url('http://i0.hdslb.com/bfs/archive/ed92db305ae43c7fc8a59b1789934caa2636b876.png')"
    };
  },
  created() {
    // 获取全局的用户名
    this.userName = this.global.currentUser;
  }
};
</script>

<style lang="scss" scoped>
.wty-header {
  width: 100%;
  height: 100%;
  // background-color: rgb(95, 196, 196);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  .wty-user-info {
    margin-right: 50px;
    color: rgb(169, 11, 11);
  }
}
</style>
